package com.autohammal;

import com.autohammal.task.TaskStatus;

/**
 * Task interface
 * @author dailey_dai Feb 18, 2011
 */
public interface ITask{
	/**
	 * get task name task name is part of taskid
	 * 
	 * @return String
	 */
	String getTaskName();

	/**
	 * identify the task
	 * 
	 * @return String
	 */
	String getTaskId();

	/**
	 * get the task status true:finished false:uncomplete
	 * 
	 * @return boolean
	 */
	TaskStatus getTaskStatus();

	void setTarget(final ITarget target);
	
	ITarget getTarget();
	/**
	 * get the task description
	 * 
	 * @return
	 */
	String getTaskDescription();

	Object getInputItem(String key);

	Object getOutputItem(String key);

	void setTaskName(String taskName);

	void setTaskStatus(TaskStatus status);

	void setInputItem(String key, Object value);

	void setOutputItem(String key, Object value);

	/**
	 * execute the task
	 */
	void executeTask() throws Exception;

	void addTaskListener(TaskListener taskListener);

	TaskListener getTaskListener();

	void removeTaskListener();

}
